﻿{include file='../Common/shake-header.html'}
	<body class="index-bg3">
		<a href="/index.php?g=home&m=shake&a=index"><img src="Home/Webroot/default/images/plus/home.png" class="home"></a>	
	<div style="height:40px"></div>	
	<div class="result-bg">
		奖品兑换
	</div>
	<div style="height:10px"></div>	
	<div class="prize-list">
		<img src="/Home/Webroot/default/images/shake/prize.png" width="100%">
		<div id="prize-msg">
			<div class="dl">
				<p class="fs4">一等奖：奖品名称</p>
				<p class="fs4">兑换积分：<span class="fc-g fs4">10000</span></p>
			</div>
			<div class="dr" onclick="canChange(1)">
				我要兑奖
			</div>
		</div>	
	</div>
	
	<div style="height:10px"></div>	
	<div class="prize-list">
		<img src="/Home/Webroot/default/images/shake/prize.png" width="100%">
		<div id="prize-msg">
			<div class="dl">
				<p class="fs4">二等奖：奖品名称</p>
				<p class="fs4">兑换积分：<span class="fc-g fs4">5000</span></p>
			</div>
			<div class="dr" onclick="canChange(2)">
				我要兑奖
			</div>
		</div>	
	</div>
	
	<div style="height:10px"></div>	
	<div class="prize-list">
		<img src="/Home/Webroot/default/images/shake/prize.png" width="100%">
		<div id="prize-msg">
			<div class="dl">
				<p class="fs4">三等奖：奖品名称</p>
				<p class="fs4">兑换积分：<span class="fc-g fs4">4000</span></p>
			</div>
			<div class="dr" onclick="canChange(3)">
				我要兑奖
			</div>
		</div>	
	</div>
	
	<div style="height:10px"></div>	
	<div class="prize-list">
		<img src="/Home/Webroot/default/images/shake/prize.png" width="100%">
		<div id="prize-msg">
			<div class="dl">
				<p class="fs4">四等奖：奖品名称</p>
				<p class="fs4">兑换积分：<span class="fc-g fs4">3000</span></p>
			</div>
			<div class="dr" onclick="canChange(4)">
				我要兑奖
			</div>
		</div>	
	</div>
	
	<div style="height:10px"></div>	
	<div class="prize-list">
		<img src="/Home/Webroot/default/images/shake/prize.png" width="100%">
		<div id="prize-msg">
			<div class="dl">
				<p class="fs4">五等奖：奖品名称</p>
				<p class="fs4">兑换积分：<span class="fc-g fs4">2000</span></p>
			</div>
			<div class="dr" onclick="canChange(5)">
				我要兑奖
			</div>
		</div>	
	</div>
	<div style="height:40px"></div>	
	
	<div class="alert" id="alert2" style="padding:15px">
		
			<div id="msg" class="fs3"></div>
			
			
			<a href="javascript:void(0)" class="alert-btn fc1 fs3">确定</a>
			
		</div>
		
	</body>
	<script type="text/javascript" src="/Home/Webroot/default/js/jquery-1.3.2.js">	</script>
	<script>
		
		
		$(function(){
				
				
				$('a.alert-btn').click(function (e) {
					$('div.alert').hide();
				});
				
				
				});
				
		function canChange(rank)
		{
			
						var url = "/index.php?g=home&m=shake&a=canChange";
							
							var dat = {
								rank:rank
							
								
							};
							$.post(url,dat,function(data)
							{
									if(data!="ok")
									{
										showMsg("你的分数不足。");
									}
									else
									{
										window.location.href='/index.php?g=home&m=shake&a=person&rank='+rank;
										//setTimeout("window.location.href='/index.php?g=home&m=shake&a=msg'",1000);
									}
									
							},'text');
		}
		
		
		function showMsg(msg)
		{
			$("#msg").text(msg);
						$('div#alert2').show();
						
		}
		
	</script>
</html>


